package file;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-07
 * Time: 14:50
 */
//字节流写数据
public class Demo10 {
    public static void main(String[] args) {
        try(OutputStream outputStream = new FileOutputStream("./test1.txt")) {
//            outputStream.write('1');
//            outputStream.write('1');
//            outputStream.write('1');
//            outputStream.write('1');
//            outputStream.write('1');
            String s = "123456798";
            outputStream.write(s.getBytes());

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
